package cl.duocap.refaxion.util;

import java.sql.Connection;
import javax.naming.Context;
import javax.naming.InitialContext;


public class Conexion {
  
    public static Connection connect() throws Exception {
        String jndiName = "java:jboss/datasources/clinicaIsinDS";
        Connection con = null;
        Context ic = new InitialContext();
        Object obj = ic.lookup(jndiName);
        javax.sql.DataSource ds = (javax.sql.DataSource) obj;
        con = ds.getConnection();
        return con;
    }
}